package org.wenhua.yuan.and.views.tab;

import android.graphics.Bitmap;

import androidx.fragment.app.Fragment;

/***
 * 对 首页底部导航 定义Tab数据结构对象 实体bean
 */
public class TabBtnBottomInfo<Color> {

    enum TabType {
        BITMAP, ICON
    }

    Class<? extends Fragment> fragment;
    String name; // 导航按钮显示名称
    String iconFont; // 表示的是assets下的文字图片地址
    Bitmap defaultBitmap;
    Bitmap selectedBitmap; // 已选中的图标


    String defaultIconName;
    String selectedIconName; // 已选中的文字图标
    Color defaultColor;
    Color tintColor; // 导航按钮名称 字体颜色（着色）
    TabType tabType; // 表示导航按钮图标实现类型

    public TabBtnBottomInfo(String name, Bitmap defaultBitmap, Bitmap selectedBitmap, Color tintColor, Color defaultColor) {
        this.name = name;
        this.defaultBitmap = defaultBitmap;
        this.selectedBitmap = selectedBitmap;
        this.tabType = TabType.BITMAP;
        this.tintColor = tintColor;
        this.defaultColor = defaultColor;
    }

    public TabBtnBottomInfo(String name, String iconFont, String defaultIconName, String selectedIconName, Color defaultColor, Color tintColor) {
        this.name = name;
        this.iconFont = iconFont;
        this.defaultIconName = defaultIconName;
        this.selectedIconName = selectedIconName;
        this.defaultColor = defaultColor;
        this.tintColor = tintColor;
        this.tabType = TabType.ICON;
    }

    public Class<? extends Fragment> getFragment() {
        return fragment;
    }

    public String getName() {
        return name;
    }

    public String getIconFont() {
        return iconFont;
    }

    public Bitmap getDefaultBitmap() {
        return defaultBitmap;
    }

    public Bitmap getSelectedBitmap() {
        return selectedBitmap;
    }

    public String getDefaultIconName() {
        return defaultIconName;
    }

    public String getSelectedIconName() {
        return selectedIconName;
    }

    public Color getDefaultColor() {
        return defaultColor;
    }

    public Color getTintColor() {
        return tintColor;
    }

    public TabType getTabType() {
        return tabType;
    }

    public void setFragment(Class<? extends Fragment> fragment) {
        this.fragment = fragment;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setIconFont(String iconFont) {
        this.iconFont = iconFont;
    }

    public void setDefaultBitmap(Bitmap defaultBitmap) {
        this.defaultBitmap = defaultBitmap;
    }

    public void setSelectedBitmap(Bitmap selectedBitmap) {
        this.selectedBitmap = selectedBitmap;
    }

    public void setDefaultIconName(String defaultIconName) {
        this.defaultIconName = defaultIconName;
    }

    public void setSelectedIconName(String selectedIconName) {
        this.selectedIconName = selectedIconName;
    }

    public void setDefaultColor(Color defaultColor) {
        this.defaultColor = defaultColor;
    }

    public void setTintColor(Color tintColor) {
        this.tintColor = tintColor;
    }

    public void setTabType(TabType tabType) {
        this.tabType = tabType;
    }
}
